//
//  AKPickView.h
//  AKPickView
//
//  Created by Allen Kwok on 14-11-18.
//  Copyright (c) 2014年 Xlink.cn. All rights reserved.
//

#import <UIKit/UIKit.h>
//#import "UIView+Extension.h"
@class AKPickView;

@protocol AKPickViewDelegate <NSObject>

@optional
-(void)toobarDonBtnHaveClick:(AKPickView *)pickView resultString:(NSString *)resultString;
-(void)toobarDonBtnHaveClick:(AKPickView *)pickView resultDate:(NSDate *)resultDate;

-(void)toobarWillRemove;

@end

@interface AKPickView : UIView

@property(nonatomic,weak) id<AKPickViewDelegate> delegate;

@property(nonatomic,copy)NSString *titleString;

/**
 *  通过plistName添加一个pickView
 *
 *  @param plistName          plist文件的名字

 *  @param isHaveNavControler 是否在NavControler之内
 *
 *  @return 带有toolbar的pickview
 */
-(instancetype)initPickviewWithPlistName:(NSString *)plistName isHaveNavControler:(BOOL)isHaveNavControler;
/**
 *  通过plistName添加一个pickView
 *
 *  @param array              需要显示的数组
 *  @param isHaveNavControler 是否在NavControler之内
 *
 *  @return 带有toolbar的pickview
 */
-(instancetype)initPickviewWithArray:(NSArray *)array isHaveNavControler:(BOOL)isHaveNavControler;

/**
 通过时间创建一个DatePicker

 @param defaulDate 默认选中时间
 @param datePickerMode 日期选择器
 @param isHaveNavControler 是否在NavControler之内
 @return 带有toolbar的datePicker
 */
-(instancetype)initDatePickWithDate:(NSDate *)defaulDate datePickerMode:(UIDatePickerMode)datePickerMode isHaveNavControler:(BOOL)isHaveNavControler;

/**
 *   移除本控件
 */
-(void)remove;
/**
 *  显示本控件
 */
-(void)show;
/**
 *  设置PickView的颜色
 */
-(void)setPickViewColer:(UIColor *)color;
/**
 *  设置toobar的文字颜色
 */
-(void)setTintColor:(UIColor *)color;
/**
 *  设置toobar的背景颜色
 */
-(void)setToolbarTintColor:(UIColor *)color;

@end

